removed console.log. Added 401 response instead of redirect on not authenticated
Secured front end. Moved login/register to angular