- improve returning of error codes by using common functions - use a separate file for authentication endpoint to improve clarity of code