working login and registration