moving login form into a restful architecture for reusability