somehow fixed a bug, added redirect after login