working login and signup, adding some error handling