Refactoring login / register views