TDS-4 Add login support

Password checking has now been implemented, but few pages do session checking yet.