Start logic to login. Refactorize URLs.