we first shall check if the current session is valid - otherwise the ses...

...sion-id will be regenerated on login via basic auth

fixes #7582 

@davivel  @bantu @karlitschek @icewind1991 @schiesbn THX