Finalize login and register process