Add auto_login function when new user registers