Merge pull request #117 from tiger-swallowtails-2014/final_fix

Final fix
Fixed redirect issue for signed in users
Merge pull request #118 from tiger-swallowtails-2014/fix_redirect

Fixed redirect issue for signed in users
removing comments and debug messages
fixed indentation and removed comments