login

Re worked login system
added fix for log in loop