Re worked Login Code

Hunting more bugs and circular redirects.