Added login with a check in localStorage for session