some changes to if_else for authentication