Login/logout/register templates

The only thing not working is submitting username/password to server,
JSON serialize not working yet.