working login(register)