Added 401 error code to REST interface for Android application,
refactoring