Added login functionality.