Adds user login functionality.