Autologin implemented

a user can be logged in automatically.