We should import package in the top level instead here:

``` python
try:
    from flask.ext.login import current_user
except ImportError:
    has_flask_login = False
    current_user = None
else:
    has_flask_login = True
```