'Get the data on PlexPy user login table.
Required parameters:
user_id (str):                  The id of the Plex user
Optional parameters:
order_column (str):             "date", "time", "ip_address", "host", "os", "browser"
order_dir (str):                "desc" or "asc"
start (int):                    Row to start from, 0
length (int):                   Number of items to return, 25
search (str):                   A string to search for, "xxx.xxx.xxx.xxx"
Returns:
json:
{"draw": 1,
"recordsTotal": 2344,
"recordsFiltered": 10,
"data":
[{"browser": "Safari 7.0.3",
"friendly_name": "Jon Snow",
"host": "http://plexpy.castleblack.com",
"ip_address": "xxx.xxx.xxx.xxx",
"os": "Mac OS X",
"timestamp": 1462591869,
"user": "LordCommanderSnow",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A",
"user_group": "guest",
"user_id": 133788'

@cherrypy.expose
@cherrypy.tools.json_out()
@requireAuth()
@addtoapi()
def get_user_logins(self, user_id=None, **kwargs):

    if (not kwargs.get('json_data')):
        dt_columns = [('timestamp', True, False), ('ip_address', True, True), ('host', True, True), ('os', True, True), ('browser', True, True)]
        kwargs['json_data'] = build_datatables_json(kwargs, dt_columns, 'timestamp')
    user_data = users.Users()
    history = user_data.get_datatables_user_login(user_id=user_id, kwargs=kwargs)
    return history
