now some user authentication is working
also cleaned up a lot of code to make it clear and neat :)