Complete login functionality.