added login functionality, latest database sql, general fixes and updates.