fixed log in error handler and log in redirecting