Refactoring and added login scene