completed bug fixes for URL redirection on login