Simplify path calculation

Signed-off-by: Michal Čihař <michal@cihar.com>
Make department fixups part of class

Signed-off-by: Michal Čihař <michal@cihar.com>
Simplify error handling in login

We don't care that much where it wen't wrong.
Also raise correct exception on parse error.

Signed-off-by: Michal Čihař <michal@cihar.com>
Remove not needed parenthesis

Signed-off-by: Michal Čihař <michal@cihar.com>