Added login and registration functionality.