Fixed login and added autologin function via CAS
+ many other things