Sign in bootstrap and refactoring