Finished functionality for user auth