Code refactoring. Added 401 interceptor.