Fixed bug in authorization and new user creation