Fixed bug in registration and implemented login :)