Some additional tests and better exception handling. Add comments to authentications controller.