Fixed some dependencies and login redirection