fixed login stuff and added cookies to ctrls