Update documentation and testing function to be more inline with Flask-Login.
Added more unit tests on user view functions and fixed problems.