Handling the login and add links more intelligently.