app.py: check if g object has current_user

<_Turbo_> and added "hasattr(g, 'current_user') and" to the error
handling filter in app.py to be able to even get that error mail