Added autologin after registration and some tests