Refactor login.processor

#370