todo unit test 100% coverage, added @login_required to user pages with redirect to login page