Fixed db connection flood
Added auth to SPA