programatically log user in after registration