Corrected function name.
Fixed redirect for login
Fixed another redirect for login