Skip to content
Bugwise
Menu
Features & Flows

Login and Sign Up

How login, sign up, password reset, 2FA, social login and biometrics work, what usually breaks, and exactly how to test them on mobile and web.

35 min beginner Mobile & web

Your banking app, your food delivery app, your email, your gym’s booking site: almost every product starts with the same two screens. Log in and Sign up. They’re the front door. If the door is stuck, nobody gets in. If the lock is weak, the wrong people do.

That’s why login is often the first feature a new tester is asked to test, and why it’s a favorite interview question (“How would you test a login page?”). By the end of this lesson you’ll have a confident, structured answer, and you’ll have found real bugs in a broken login screen.

How it works

Logging in is called authenticationAuthenticationChecking who a user is, usually with a password, a code or biometrics.Open in glossary →: proving who you are. It’s different from authorizationAuthorizationChecking what a logged-in user is allowed to see or do.Open in glossary →, which decides what you’re allowed to do once you’re in (for example, only admins can issue refunds).

Here’s what happens behind the screen when you tap Log in:

App
Server
Database
  1. 1Sends email + password over HTTPS

    POST /login
  2. 2Finds the user and compares password hashes

  3. 3Match found

  4. 4Creates a session and returns a token

    token: 8f2a…
  5. 5Stores the token safely (Keychain, Keystore or a cookie)

  6. 6Every next request carries the token

    GET /orders
  7. 7Checks the token and answers

    200 · Anna's orders
The password is checked once. After that, the token proves who you are until you log out or it expires.
  1. You enter your credentials. Usually an email (or username or phone number) and a password.
  2. The app sends them to the server. Always over an encrypted HTTPS connection, and inside the request body, never in the URL.
  3. The server checks them. It looks up the account and compares the password with a stored hash (a scrambled version). A good server never stores your actual password.
  4. The server starts a sessionSessionThe period during which a user stays logged in without entering their credentials again.Open in glossary →. It sends back a token: a long random string that works like a wristband at a festival. You showed your ticket once, and now the wristband gets you in.
  5. The app stores the token. Mobile apps use secure storage (iOS Keychain, Android Keystore). Websites usually use a cookieCookieA small piece of data a website stores in your browser, for example to keep you logged in.Open in glossary →.
  6. Every next request carries the token. “Show my orders” works because the server sees the token and knows it’s you.
  7. Logging out (or expiry) ends the session. The server invalidates the token, so even a copied token stops working.

The family of login features

“Login” is rarely just one screen. Here’s what you’ll meet in real projects:

FeatureWhat it doesWhat to watch out for
Sign up (registration)Creates a new account: name, email, password, maybe terms checkboxPassword rules really enforced, duplicate emails, confirmation email
Log in (sign in)Proves you own an existing accountWrong-credential handling, lockout, “remember me”, sessions
Password reset“Forgot password?” sends a one-time link or code by email or SMSLink expires, works only once, old password stops working, generic message
Two-factor authentication (2FA)After the password, asks for a second proof: SMS code, authenticator app code, or a push approvalWrong or expired codes, resend limits, “trust this device”
Social login“Sign in with Apple” or “Sign in with Google” lets another company vouch for youCanceling halfway, Apple’s “Hide My Email”, linking to an existing account
BiometricsFace ID, Touch ID or fingerprint unlocks a saved login on the deviceFallback to password, new fingerprint added, biometrics turned off
LogoutEnds the session on this device (sometimes “log out everywhere”)Back button, cached screens, other tabs and devices

Example requirements

Before you test, you need to know what “correct” means. Here’s a realistic user storyUser storyA short description of a feature from the user's point of view.Open in glossary → for a grocery delivery app, with acceptance criteriaAcceptance criteriaConditions a user story must meet to be considered done and accepted.Open in glossary →:

Notice how many criteria are about things other than “it logs in”. Criteria 2, 4, 5, 7, 9 and 10 each prevent a real bug that teams ship all the time.

Why “generic error message” matters

If the app says “No account with this email” for one address and “Wrong password” for another, an attacker can feed it a list of emails and learn which people have accounts. That’s called account enumerationAccount enumerationFinding out which emails are registered from differences in error messages or responses.Open in glossary →. They can then target those people with phishing or password guessing.

Reveals which emails exist

maria@example.com
••••••••

No account found with this email.

Log in

An attacker now knows maria@example.com is not a customer, and will happily try the next address.

Same message for both cases

maria@example.com
••••••••

Email or password is incorrect.

Log in

The attacker learns nothing. A real customer still knows what to do: check both and try again.

What usually goes wrong

These bugs appear in login features again and again. Learn them once and you’ll recognize them everywhere.

#BugWhat you seeTypical severity
1Case-sensitive or untrimmed emailAnna@test.com or anna@test.com (with a space from autofill or the keyboard) says “no account”High
2Account enumerationDifferent messages for “unknown email” and “wrong password”Medium–High (security)
3Lockout missing or bypassableUnlimited password guesses, or the counter resets when you reload or switch screensHigh (security)
4Password leaksPassword in the URL, in logs, in analytics events, or visible in a screenshot of the app switcherCritical (security)
5double submitDouble submitA bug where an action runs twice because the user tapped or clicked twice quickly.Open in glossary →Tapping Log in twice creates two sessions or two accountsMedium
6Rules not enforcedThe UI says “at least 8 characters” but 1234 is accepted (often only the client checks, or the wrong number)Medium–High
7Session not really endedAfter logout, Back shows the account screen, or the old token still worksHigh (security)
8Session expires badlyUser is kicked out mid-checkout and loses their basket, or never expires at allMedium
9Autofill and password managers breakThe keyboard doesn’t offer saved passwords, or autofill fills the wrong fieldMedium
10Unhelpful error messagesError messageText that tells the user something went wrong and, ideally, how to fix it.Open in glossary →“Error 500” or “Something went wrong” with no next step, or errors that never clearLow–Medium
11Reset link problemsLink works twice, never expires, or opens the browser instead of the appHigh
12Accessibility gapsFields without labels, errors not announced by screen readers, show-password icon with no nameHigh (for affected users)

Find the bug

Time to practice. FreshCart’s login and sign up screens below have six bugs. Explore them like a tester:

  • Log in with the test account. Then try variations of the same email.
  • Try a wrong password, and an email that doesn’t exist. Compare the messages.
  • Watch the server log for every request.
  • Tap buttons quickly, more than once.
  • Create a new account and read the password rule.
  • Log out, then use Swipe back.

🐞 Bug hunt: FreshCart login

This demo has 6 hidden bugs. Explore it like a tester, then check your findings.

Found0/6
9:41

FreshCart

Groceries in 30 minutes

or

New to FreshCart?

Device

Test account

anna@test.com / Secret123!

From the spec: passwords need at least 8 characters, the account locks after 5 failed attempts, and error messages must not reveal whether an email is registered.

Locked yourself out? Tap Restart app.

Server log

  • Log in or sign up to see requests…
  1. 1

    Hint: Log in as Anna@test.com, or add a space after the email.

  2. 2

    Hint: Compare a wrong password for anna@test.com with any unknown email.

  3. 3

    Hint: Read the first line of each login request in the server log.

  4. 4

    Hint: Tap Log in twice quickly with the correct password, then look at Active sessions.

  5. 5

    Hint: Create an account with the password "abcd".

  6. 6

    Hint: Log in, log out, then use Swipe back.

Test scenarios

A test scenarioTest scenarioA high-level idea of what to test, such as 'User resets a forgotten password'.Open in glossary → is a one-line idea of what to check. Group them by type so you don’t forget whole areas. Here’s a strong starting set for login and sign up. For the sign up form itself (field rules, real-world names and addresses, error messages), see Forms and Validation.

Functional

The happy paths, the core of positive testingPositive testingTesting with valid input to confirm the software works as expected.Open in glossary →:

  • Log in with a valid email and password and land on the Home screen.
  • Sign up with valid data, then log out and log in with the new account.
  • Remember me on: close and reopen the app (or browser), you’re still logged in. Off: you have to log in again.
  • Forgot password: the email arrives, the link opens the reset screen, the new password works, the old one doesn’t.
  • 2FA: a correct code logs you in; “Resend code” sends a new one and the old code stops working.
  • Social login: Sign in with Apple and Google create an account on first use and log in to the same account next time.
  • Biometrics: after enabling Face ID or fingerprint, the next login only needs a glance or a touch.
  • Logout ends the session and returns to the Log in screen.

Negative

negative testingNegative testingTesting with invalid or unexpected input to check the software handles it gracefully.Open in glossary →: the app should refuse politely, and never crash or leak information.

  • Wrong password for an existing email.
  • Email that has no account.
  • Empty email, empty password, both empty.
  • Badly formatted email: anna@, anna.test.com, anna@@test.com.
  • Sign up with an email that’s already registered.
  • Sign up with a password that breaks the rules (too short, or missing a required number).
  • Expired or already-used password reset link.
  • Wrong, expired or reused 2FA code.
  • Cancel the Apple or Google sheet halfway through.

Edge cases

Edge casesEdge caseAn unusual situation at the extreme of what the software should handle.Open in glossary → are where the interesting bugs live:

UI & usability

Security basics

You don’t need to be a security expert to catch these. security testingSecurity testingChecking that data and features are protected from unauthorized access and attacks.Open in glossary → at this level is mostly careful observation (see Security basics for more):

  • Generic error messages for wrong email and wrong password (no account enumeration). Same for password reset.
  • Lockout or rate limiting after the agreed number of failed attempts, enforced on the server (refreshing or reinstalling must not reset it).
  • Password never in the URL, logs or analytics. Check with DevToolsDevToolsDeveloper tools built into browsers for inspecting pages, network traffic and errors.Open in glossary → (Network tab) on the web or a proxy tool on mobile.
  • HTTPS only. Try http:// on the web: it should redirect to https://.
  • Logout really logs out: Back button, browser history and reopened tabs must not show protected pages. An old token copied before logout must be rejected.
  • Session expiry: after the agreed idle time, the next action asks you to log in again, and returns you to where you were afterwards.
  • Password field is masked and its value is not copyable (Copy is disabled on masked fields).
  • Reset links expire and work only once. Changing the password ends other sessions.
  • The app switcher on mobile shouldn’t reveal sensitive data (many banking apps blur the screen).

Accessibility

accessibility testingAccessibility testingChecking that people with disabilities can use the product, for example with a screen reader.Open in glossary → for login matters a lot: if someone can’t log in, they can’t use anything else.

Example test cases

Scenarios become test casesTest caseA written set of steps, data and an expected result used to check one specific behavior.Open in glossary → once you add exact steps, test dataTest dataThe input values, accounts and records you use while testing.Open in glossary → and expected results:

TC-LOGIN-001Log in with valid email and password

Preconditions

  • Account anna@test.com exists and is not locked
  • User is logged out

Steps

  1. Open the app
  2. Enter the email
  3. Enter the password
  4. Tap "Log in"

Test data

email: anna@test.com / password: Secret123!

Expected result

Home screen opens and shows "Hi, Anna". Exactly one new session is created.

TC-LOGIN-002Email is case-insensitive and trimmed

Preconditions

  • Account anna@test.com exists

Steps

  1. Enter "Anna@Test.COM " (capital letters, trailing space)
  2. Enter the correct password
  3. Tap "Log in"

Test data

password: Secret123!

Expected result

User is logged in to the anna@test.com account.

TC-LOGIN-003Same generic error for wrong password and unknown email

Steps

  1. Log in with anna@test.com and password "Wrong123!"
  2. Note the message
  3. Log in with nobody@test.com and password "Wrong123!"
  4. Compare the messages

Expected result

Both attempts show exactly "Email or password is incorrect." The response time and status code are also the same.

TC-LOGIN-004Account locks after 5 failed attempts

Preconditions

  • Account anna@test.com is not locked

Steps

  1. Enter anna@test.com with a wrong password 5 times
  2. Enter the correct password
  3. Restart the app and try the correct password again

Expected result

After the 5th failure a lockout message is shown. The correct password is rejected while the lock lasts, also after a restart.

TC-LOGIN-005Log in button cannot be submitted twice

Preconditions

  • Network throttled to a slow connection

Steps

  1. Enter valid credentials
  2. Tap "Log in" twice quickly

Expected result

The button is disabled after the first tap. Only one login request is sent and one session is created.

TC-LOGIN-006Credentials are not sent in the URL

Preconditions

  • Proxy tool or browser DevTools is recording traffic

Steps

  1. Log in with valid credentials
  2. Inspect the login request

Expected result

The request is a POST over HTTPS. Email and password are only in the request body, never in the URL or query string.

TC-SIGNUP-001Password length boundary at sign up

Steps

  1. Open Sign up and fill in name and a new email
  2. Enter a 7-character password and submit
  3. Change it to 8 characters and submit

Test data

7 chars: Abcde12 / 8 chars: Abcde123

Expected result

7 characters: error "Password must be at least 8 characters." and no account is created. 8 characters: account is created.

TC-LOGOUT-001Back after logout does not show protected screens

Preconditions

  • User is logged in

Steps

  1. Tap "Log out"
  2. Swipe back (iOS) / press Back (Android) / press the browser Back button

Expected result

The Log in screen stays (or the app closes on Android). No personal data is shown. Any protected request returns 401.

Tip: click a test case to expand it.

Mobile vs web

The idea is the same everywhere, but the details, and the bugs, differ a lot.

  • Biometrics: test enabling and disabling Face ID / Touch ID / fingerprint, failed scans and the fallback to passcode or password. Also what happens if a new fingerprint or face is added in device settings (many banking apps then require the password again).
  • Keychain and Autofill: iOS Password AutoFill and Android Autofill should offer saved passwords and “suggest strong password” on sign up. If they don’t, the fields are probably missing the right content type hints.
  • Keyboard types: email keyboard with @, no auto-capitalization or autocorrect on email and password. Check that the keyboard doesn’t cover the Log in button.
  • App backgrounding: put the app in the background during login (or while the 2FA SMS arrives) and come back. The form should keep its data, the session shouldn’t break, and the app switcher shouldn’t show sensitive data.
  • Staying logged in: mobile apps usually keep you logged in for weeks. Test restarting the app, restarting the phone, updating the app, and reinstalling (the iOS Keychain can survive a reinstall, so check whether you’re unexpectedly still logged in).
  • Deep links from emails: a password reset or “confirm your email” link should open the app (a deep linkDeep linkA link that opens a specific screen inside an app instead of just its home screen.Open in glossary →, see Deep links), not the browser. Test with the app installed, not installed, and logged in as a different user.
  • 2FA codes: iOS and Android can autofill SMS codes from messages. Check that the code field supports it.
  • Back button (Android): after logout, the system Back button must not return to the account.
  • Browser autofill and password managers: Chrome, Safari, Firefox and tools like 1Password should detect the fields and offer to save the password after sign up. Check that they fill the right fields.
  • Remember me cookies: with “Remember me”, closing and reopening the browser keeps you logged in. Without it, the session should end. Look at the cookieCookieA small piece of data a website stores in your browser, for example to keep you logged in.Open in glossary → in DevTools (Application tab): expiry date, and flags like Secure and HttpOnly.
  • Multiple tabs: log out in one tab, then click something in another. The second tab should send you to the login page, not keep working. Log in as a different user in a new tab and check the first tab doesn’t mix up data.
  • Back button and history: after logout, the browser Back button must not show cached account pages. The password must never appear in browser history (which happens with GET forms).
  • HTTPS: http:// should redirect to https://, and the browser should show no “Not secure” warning on the login page.
  • Network tab: in DevToolsDevToolsDeveloper tools built into browsers for inspecting pages, network traffic and errors.Open in glossary →, check that login is a POST, that the password isn’t in the URL, and what the error responses contain.
  • Cross-browser: test login in Chrome, Safari and Firefox, including private/incognito windows (cookies behave differently there).
  • Keyboard only: Tab through the form, submit with Enter, and check the focus ring is always visible.

Checklist

Login and sign up checklist

0 of 15 checked

Check your understanding

Quick quiz

0/5 answered · 0 correct

  1. 1.Which error message is the safest for a failed login?

  2. 2.Your login works with "anna@test.com" but fails with "Anna@test.com". What kind of bug is this?

  3. 3.The rule says "at least 8 characters". Which set of password lengths gives the best boundary test?

  4. 4.In DevTools you see: GET /api/login?email=anna%40test.com&password=Secret123!. What is the problem?

  5. 5.After tapping Log out, you press Back and see the account screen with the user's address. What should you do?

Key takeaways

  • Login is authenticationAuthenticationChecking who a user is, usually with a password, a code or biometrics.Open in glossary →: credentials go to the server once, and a session token proves who you are after that.
  • Test the whole family: sign up, log in, password reset, 2FA, social login, biometrics and logout.
  • The classic bugs: case-sensitive emails, account enumeration, missing lockout, passwords in URLs, double submit, rules not enforced, and logout that doesn’t really log out.
  • Use boundary values for password rules and lockout counts, and always try uppercase, spaces, long input and unicode.
  • Watch the network (DevTools or a proxy) and check Back, other tabs and app restarts after logout.

Finished this page?Nice work, this page is complete!

Mark it as done to track your progress. It's saved in this browser, no account needed.

Its review cards are now in Bites ⚡
Esc

Type to search the whole site.