Resolved autologin problem. add another entity called LastUser in DB.