implemented registration, added parameter check for login