Edit the Login function and Link to Main Page