Declare and init window controller on same line

For some reason we declared the authentication window controller on one
line and initialized it on the next line. This is not necessary and just
complicates the code section. Instead initialize it on the same line.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Consolidate server outline view to its own class

We subclass NSOutlineView so that we can catch menuForEvent: and present
the context menu. We already had the data source and delegate set to the
window controller, but since we introduced the subclass we don't really
need it there. Move it to the subclass, making it reusable without
duplicating the code in the window controller.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Wait for greeting when connecting

We should wait for the server greeting to arrive before we go ahead and
authenticate. It is possible that the server might deny our connection,
or that we are already authenticated. This will require the greeting, so
we'll have to wait for it.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Do not authenticate if already authenticated

The connection might already be authenticated by external means. In that
case the server greeting is not an OK but a PREAUTH. Detect if server
replies with PREAUTH, and if it does do not attempt to authenticate.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>