Basic security

Implemented session handling for logging in and securing certain API
calls