make login/registering work and get some minor changes