Renamed some files.
Added basic checking for the database with loggin.