Refactor test and view
Finish sign in