Misc Login Updates

+ Corrected login redirects
+ Created function to set session