Refactored login/unlock activities