add /login and /user relationship...

work in progress, need to clean up code and remove unused code.