Implement login function on web app