Login repackaging
Added authentication from database.