Code cleaning
Added URL redirect on login (untested) (WIP)