fixed registration and loginin