Adds login functionality.