Api requests now handled by separate API module.
Login now uses newly added API module.

Note:
API module cannot handle error codes. Server-side error handling too
inconsistent.
removed error from api_request
Fixed indentation, added some todos
Merge branch 'master' into database

Conflicts:
	ifiske-app/www/index.html
	ifiske-app/www/static/js/templates.js