Correct login logic and remove angular-cookies.