Implementing user registration and login session with rails and angular