Moved login and logout scripts to API
Fixed buggy reset-password