Update api.py

user login failure return 401.
refactor part code
fix new new_albums method action
refactore
fix action format
fix api_endpoint format no base_url
merge from kinchu -> add "api_endpoint"
Merge branch 'kinchu-master'