authentication and writing user to the DB works