Do you want to track unique logins, that is, one user's login will be counted only once on every given day?
You'll need a table containing rows, say,
DATE and
USERNAME. When a user logs in, you'll check whether a record for current date and the username already exists in the table, if it does, do nothing, if it doesn't, insert a new row with current date and the username. If you define a primary key on the table (and
you should do it), you can just try to insert the row on each login and just handle possible primary key collision gracefully.
To obtain the number of logins per day, you'd just select count of records (
COUNT(*)) grouped by the date. You could create a view with this query to plug it into JFreeChart seamlessly.
If you don't want to keep a longer history, you also need to have a process in place that will delete records older than 15 days every day.