Added database support, began login implemetation.