working login and registration for native