Separating auth methods from base

moving methods that handle authentication and displaying login from away from base

Cc @LukasReschke @MorrisJobke 
Please use a compatible license header:

```
/**
 * Copyright (c) 2014 Clark Tomlinson clark@owncloud.com
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
```